home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / languages / pcq_incl3v1.lha / Graphics / Sprite.i < prev    next >
Encoding:
Text File  |  1994-10-12  |  2.0 KB  |  74 lines

  1. {
  2.     Sprite.i for PCQ Pascal
  3. }
  4.  
  5. const
  6.  
  7.     SPRITE_ATTACHED     = $80;
  8.  
  9. type
  10.  
  11.     SimpleSprite = record
  12.         posctldata      : Address;
  13.         height          : Short;
  14.         x,y             : Short;        { current position }
  15.         num             : Short;
  16.     end;
  17.     SimpleSpritePtr = ^SimpleSprite;
  18.  
  19.     ExtSprite = Record
  20.         es_SimpleSprite : SimpleSprite;         { conventional simple sprite structure }
  21.         es_wordwidth    : WORD;                 { graphics use only, subject to change }
  22.         es_flags        : WORD;                 { graphics use only, subject to change }
  23.     end;
  24.     ExtSpritePtr = ^ExtSprite;
  25.  
  26. const
  27. { tags for AllocSpriteData() }
  28.  SPRITEA_Width          = $81000000;
  29.  SPRITEA_XReplication   = $81000002;
  30.  SPRITEA_YReplication   = $81000004;
  31.  SPRITEA_OutputHeight   = $81000006;
  32.  SPRITEA_Attached       = $81000008;
  33.  SPRITEA_OldDataFormat  = $8100000a;      { MUST pass in outputheight if using this tag }
  34.  
  35. { tags for GetExtSprite() }
  36.  GSTAG_SPRITE_NUM = $82000020;
  37.  GSTAG_ATTACHED   = $82000022;
  38.  GSTAG_SOFTSPRITE = $82000024;
  39.  
  40. { tags valid for either GetExtSprite or ChangeExtSprite }
  41.  GSTAG_SCANDOUBLED     =  $83000000;      { request "NTSC-Like" height if possible. }
  42.  
  43.  
  44.  
  45.  
  46. Procedure ChangeSprite(vp : Address; s : SimpleSpritePtr; newData : Address);
  47.     External;   { vp is a ViewPortPtr }
  48.  
  49. Procedure FreeSprite(pick : Short);
  50.     External;
  51.  
  52. Function GetSprite(sprite : SimpleSpritePtr; pick : Short) : Short;
  53.     External;
  54.  
  55. Procedure MoveSprite(vp : Address; sprite : SimpleSpritePtr; x, y : Short);
  56.     External;   { vp is a ViewPortPtr }
  57.  
  58. { --- functions in V39 or higher (Release 3) --- }
  59.  
  60. FUNCTION GetExtSpriteA(ss : ExtSpritePtr; taglist : Address) : Integer;
  61.     External;
  62.  
  63. FUNCTION AllocSpriteDataA(BM : BitMapPtr; TagList : Address) : ExtSpritePtr;
  64.     External;
  65.  
  66. FUNCTION ChangeExtSpriteA(VP : ViewPortPtr; oldsprite, newsprite : ExtSpritePtr;
  67.                           TagList : Address) :  Integer;
  68.     External;
  69.  
  70. PROCEDURE FreeSpriteData(sp : ExtSpritePtr);
  71.     External;
  72.  
  73.  
  74.